<template>
	<view class="top" :style="{ height: (titleHeight + statusBarHeight) + 'px', backgroundImage: `url(${topSrc})` }">
		
		<!-- <picker @change="handleSelect" :value="index" :range="array"> -->
			<view :style="{
				paddingTop: statusBarHeight + 'px', 
				height: titleHeight + 'px',
				lineHeight: titleHeight + 'px',
			}">
				<view class="union-name">{{orgName}}</view>
				<!-- <up-icon name="arrow-down" color="#fff"></up-icon>array[index] -->
			</view>
		<!-- </picker> -->
	</view>
</template>

<script>
	export default {
		props: {
			titleHeight: {
				type: Number,
				default: 0
			},
			statusBarHeight: {
				type: Number,
				default: 0
			},
			topSrc: String
		},
		data() {
			return {
				union: '',
				show: false,
				array: ['北京一轻食品集团有限公司工会'], // '北京一轻集团工会', '北京红星股份工会'
				index: 0,
				orgName: '工会健步行'
			}
		},// orgName
		onLoad() {
			// let userInfo = uni.getStorageSync('userInfo')
			// this.orgName = userInfo.orgName || '食品集团'
		},
		methods: {
			handleSelect(e) {
				// this.index = e.detail.value
			}
		}
	}
</script>

<style lang="scss" scoped>
	
.top {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99;
	background-size: 100%;
	box-sizing: border-box;
	
	view {
		color: #fff;
		display: flex;
		align-items: center;
		font-size: 32rpx;
		
		.union-name {
			padding-left: 30rpx;
			padding-right: 10rpx;
		}
	}
}
</style>
